package com.yxsa.controller;

import com.yxsa.service.OrderDeduct;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RestController
public class OrderController {

    @Resource
    private OrderDeduct orderDeduct;

    @GetMapping("/order/deduct")
    public Boolean deduct(@RequestParam("commodityCode") String commodityCode, @RequestParam("count") Integer count) throws InterruptedException {
        return orderDeduct.save(commodityCode,count);
    }

}
